home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16548 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: fas-news.harvard.edu!scws44!ccshan
  2. From: ccshan@scws44.harvard.edu (Chung-chieh Shan)
  3. Newsgroups: comp.sys.sgi.apps,comp.lang.c++
  4. Subject: Re: SGI's C++ compiler and the boolean type
  5. Followup-To: comp.sys.sgi.apps,comp.lang.c++
  6. Date: 10 Apr 1996 23:04:20 GMT
  7. Organization: Harvard University
  8. Message-ID: <4khepk$8k1@decaxp.HARVARD.EDU>
  9. References: <4kefm7$oao@ncar.ucar.edu> <4kg6fv$h7k@nic.ftns.no>
  10. NNTP-Posting-Host: scws44.harvard.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. > And some argue that true should be -1, because then bitwise not works:
  14. > ~(true = -1) == (false = 0)
  15. > ~(false = 0) == (true = -1)
  16.  
  17. According to the proposed standard, true is implicitly casted from
  18. bool to the integer 1.  Nonzero integers are implicitly casted from
  19. int to the bool true.
  20.  
  21. Funny nobody has written an implementation of bool. (AFAIK)
  22.  
  23. --
  24. blue | Chung-chieh Shan (Ken) | Life is a sexually transmitted
  25.  ()  | ccshan@fas.harvard.edu |      math too is a terminal representation
  26.  /\  | Finger for PGP key     |      game.         disease. of Quality.
  27.